﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WebApplication1.Entity;
using yunbo.Model.BIP;
using yunbo.Repositorys.FPMRepositorys;
using yunbo.Repositorys.SSMRepositorys;

namespace yunbo.Controllers.BIPControllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class Mbd_BOMxqController : ControllerBase
    {
        Mbd_BOMxqRepository menuRepositorys = new Mbd_BOMxqRepository();
        /// <summary>
        /// 获取bom树状图
        /// </summary>
        /// <param name="bomcode"></param>
        /// <returns></returns>
        [HttpGet("GetBomTree")]
        public IActionResult GetBomTree(string bomcode)
        {
            List<Mbd_BOMxgNode> quans = menuRepositorys.GetBomTree(bomcode);
            return Ok(quans);
        }
        [HttpGet("GetMbd_BOMxg")]
        public IActionResult GetMbd_BOMxg(string bomcode)
        {
            List<Mbd_BOMxg> bOMxgs = menuRepositorys.GetMbd_BOMxg(bomcode);
            return Ok(bOMxgs);
        }
        [HttpGet("GetBom")]
        public IActionResult GetBom(string wl_code)
        {
            List<Mbd_BOMxg> bOMxgs = menuRepositorys.GetBom(wl_code);
            return Ok(bOMxgs);
        }
    }
}
